package com.future.baselib.utils;

import android.content.Context;

/**
 * Created by jniu on 2017/11/27.
 */

public class UserInfoSharePreference extends BasePreference {
    private static UserInfoSharePreference preference;

    private String USER_TOKEN = "user_token";

    private  UserInfoSharePreference(Context context) {
        super(context);
    }

    public synchronized static UserInfoSharePreference getInstance(Context context){
        if (preference ==null) {
            preference = new UserInfoSharePreference(context.getApplicationContext());
        }
        return preference;
    }

    public void setUserToken(String userToken){
        setString(USER_TOKEN,userToken);
    }

    public String getUserToken(){
        return getString(USER_TOKEN);
    }
}
